﻿<%@ Page Title="Propostas" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true"
    CodeBehind="FollowUp.aspx.cs" Inherits="Follow.Cadastros.FollowUp" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <div class="Titulo">
        <%: Title %><br />
        <asp:Image ID="imgTitulo" runat="server" ImageUrl="~/images/linhas_17.png" />
    </div>
    <asp:MultiView ID="mvFollowUp" runat="server" ActiveViewIndex="0">
        <asp:View ID="View0" runat="server">
            <div class="subTitulo">
                <asp:Label ID="lblTituloView1" runat="server" Text="Lista de Propostas" />
            </div>
            <br />
            <div id="divMsg1" class="isa_info" runat="server" visible="false" >
                <asp:Label ID="lblMsg1" runat="server" Text="Mensagem." />
            </div>
            <div class="divPesquisa">
                <asp:Label ID="lblPesquisa" Text="Pesquisa por Status:" runat="server" /><br />
                <asp:DropDownList ID="ddlPesquisaStatus" runat="server" Width="300px" 
                    Height="25px"/>
                <asp:Button ID="btnPesquisa" runat="server" Text="Pesquisar" CssClass="Botao" OnClick="btnPesquisa_Click" />
                <asp:Button ID="btnIncluir" runat="server" Text="Incluir" CssClass="Botao" OnClick="btnIncluir_Click" /><br />
            </div>
            <br />
            <br />
            <asp:GridView ID="gvFollowUp" runat="server" AllowPaging="True" AutoGenerateColumns="False" PageSize = "100"
                DataKeyNames="IDFollowUp,IDProposta" Width="771px" BackColor="White" BorderColor="#DEDFDE"
                ForeColor="Black" GridLines="Vertical" RowStyle-HorizontalAlign="Center" OnRowCommand="gvFollowUp_RowCommand"
                OnRowDataBound="gvFollowUp_RowDataBound" OnPageIndexChanging="gvFollowUp_PageIndexChanging">
                <AlternatingRowStyle BackColor="White" />
                <Columns>
                    <asp:TemplateField ItemStyle-Width="15px" ShowHeader="False">
                        <ItemTemplate>
                            <asp:Image ID="imgStatus" runat="server" Width="16px" CssClass="configImgGrid" />
                        </ItemTemplate>
                        <ItemStyle HorizontalAlign="Center" />
                    </asp:TemplateField>
                    <asp:BoundField HeaderText="IDFollowUp" DataField="IDFollowUp" Visible="false" />
                    <asp:TemplateField HeaderText="IDStatusFollow" Visible="False">
                        <ItemTemplate>
                            <asp:Label ID="lblIdStatusFollow" runat="server" Text='<%# Bind("IDStatusFollow") %>'></asp:Label>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:BoundField HeaderText="DescricaoStatus" DataField="DescricaoStatus" Visible="false" />
                    <asp:BoundField HeaderText="Nº Proposta" DataField="IDProposta" Visible="true" ItemStyle-HorizontalAlign="Center" />
                    <asp:BoundField HeaderText="Cliente" DataField="NomeCliente" ItemStyle-HorizontalAlign="Center" />
                    <asp:BoundField HeaderText="Funcionario" DataField="NomeFuncionario" Visible="true" ItemStyle-HorizontalAlign="Center"  />
                    <asp:BoundField HeaderText="DataProposta" DataField="DataProposta" ItemStyle-HorizontalAlign="Center" />
                    <asp:BoundField HeaderText="ObservacoesFollow" DataField="ObservacoesFollow" Visible="false" />
                    <asp:TemplateField ShowHeader="False">
                        <ItemTemplate>
                            <asp:LinkButton ID="lkbDetalhesProposta" runat="server" ToolTip="Detalhes da Proposta"
                                CommandName="VerDetalhes">
                                <div class="botaoDetalhes"></div>
                            </asp:LinkButton>
                        </ItemTemplate>
                        <ItemStyle HorizontalAlign="Center" />
                    </asp:TemplateField>
                    <asp:TemplateField ShowHeader="False" ItemStyle-Width="15px">
                        <ItemTemplate>
                            <asp:LinkButton ID="lkbAlterarProposta" runat="server" ToolTip="Alterar Proposta"
                                CommandName="AlterarProposta">
                                <div class="botaoAlterar"></div>
                            </asp:LinkButton>
                        </ItemTemplate>
                        <ItemStyle HorizontalAlign="Center" />
                    </asp:TemplateField>
                    <asp:TemplateField ShowHeader="False" ItemStyle-Width="15px">
                        <ItemTemplate>
                            <asp:LinkButton ID="lkbExcluirProposta" runat="server" ToolTip="Deletar Proposta"
                                CommandName="DeletarProposta">
                                <div class="botaoDelete"></div>
                            </asp:LinkButton>
                        </ItemTemplate>
                        <ItemStyle HorizontalAlign="Center" />
                    </asp:TemplateField>
                    <asp:TemplateField ShowHeader="False" ItemStyle-Width="15px">
                        <ItemTemplate>
                            <asp:LinkButton ID="lkbAlterarStatus" runat="server" ToolTip="Realizar Follow Up"
                                CommandName="AlterarStatus">
                                <div class="botaoFollowUp"></div>
                            </asp:LinkButton>
                        </ItemTemplate>
                        <ItemStyle HorizontalAlign="Center" />
                    </asp:TemplateField>
                </Columns>
                <FooterStyle BackColor="#CCCC99" />
                <HeaderStyle BackColor="#6B696B" Font-Bold="True" ForeColor="White" />
                <PagerStyle BackColor="#F7F7DE" ForeColor="Black" HorizontalAlign="Right" />
                <RowStyle BackColor="#F7F7DE" />
                <SelectedRowStyle BackColor="#CE5D5A" Font-Bold="True" ForeColor="White" />
                <SortedAscendingCellStyle BackColor="#FBFBF2" />
                <SortedAscendingHeaderStyle BackColor="#848384" />
                <SortedDescendingCellStyle BackColor="#EAEAD3" />
                <SortedDescendingHeaderStyle BackColor="#575357" />
            </asp:GridView>
            <asp:Label ID="lblMsgGridFollowUp" runat="server" Text="Nenhum registro encontrado."
                Visible="false"></asp:Label>
            <br />
            <br />
            <br />
            <b>Legenda:</b>
            <table>
                <tr>
                    <td>
                        <img src="../Images/1%20-%20Nova.png" width="16px" />
                    </td>
                    <td>
                        Nova
                    </td>
                </tr>
                <tr>
                    <td>
                        <img src="../Images/2%20-%20Aguardando.png" width="16px" />
                    </td>
                    <td>
                        Aguardando aprovação
                    </td>
                </tr>
                <tr>
                    <td>
                        <img src="../Images/3%20-%20Retornado.png" width="16px" />
                    </td>
                    <td>
                        Retornado para alteração
                    </td>
                </tr>
                <tr>
                    <td>
                        <img src="../Images/4%20-%20Aprovada.png" width="16px" />
                    </td>
                    <td>
                        Aprovada
                    </td>
                </tr>
                <tr>
                    <td>
                        <img src="../Images/5%20-%20Reprovada.png" width="16px" />
                    </td>
                    <td>
                        Reprovada
                    </td>
                </tr>
                <tr>
                    <td>
                        <img src="../Images/6%20-%20Concluída.png" width="16px" />
                    </td>
                    <td>
                        Concluída
                    </td>
                </tr>
            </table>
        </asp:View>
        <asp:View ID="View1" runat="server">
            <div class="subTitulo">
                <asp:Label ID="lblTitulo2" runat="server" Text="Status da Proposta" />
            </div>
            <div id="divMsg2" class="isa_info" runat="server" visible="false" >
                <asp:Label ID="lblMsg2" runat="server" Text="Mensagem." />
            </div>
            <asp:HiddenField ID="idFollowUp" runat="server" />
            <asp:HiddenField ID="idProposta" runat="server" />
            <br />
            <b>Status:</b>
            <br />
            <asp:DropDownList ID="ddlStatus" runat="server" ></asp:DropDownList>
            <asp:RequiredFieldValidator ID="rfvStatus" runat="server" ControlToValidate="ddlStatus" ForeColor="Red"
                Display="Dynamic" ErrorMessage="*" InitialValue="* Campo Status não selecionado"></asp:RequiredFieldValidator>
            <br />
            <br />
            <b>Observação:</b>
            <br />
            <asp:TextBox ID="txtObservacao" runat="server" TextMode="MultiLine" Height="80px"
                Width="420px" />
            <br />
            <br />
            <asp:Button ID="btnSalvar" runat="server" Text="Salvar" OnClick="btnSalvar_Click"
                CssClass="Botao" />
            <asp:Button ID="btnCancelar" runat="server" Text="Cancelar" CausesValidation="false"
                OnClick="btnCancelar_Click" CssClass="Botao" />
            <br />
            <br />
            <br />
            <br />
            <asp:GridView ID="gvHistoricoStatus" runat="server" AllowPaging="True" AutoGenerateColumns="False"
                Width="765px" BackColor="White" BorderColor="#DEDFDE" BorderStyle="None" BorderWidth="1px"
                CellPadding="4" ForeColor="Black" GridLines="Vertical">
                <AlternatingRowStyle BackColor="White" />
                <FooterStyle BackColor="#CCCC99" />
                <Columns>
                    <asp:BoundField HeaderText="Status" DataField="DescricaoStatusFollow" Visible="true" />
                    <asp:BoundField HeaderText="Proposta" DataField="IdProposta" Visible="false" />
                    <asp:BoundField HeaderText="FollowUp" DataField="IdFollowUp" Visible="false" />
                    <asp:BoundField HeaderText="Observação" DataField="ObservacaoFollow" />
                    <asp:BoundField HeaderText="Data do Follow Up" DataField="DataFollowUp" />
                </Columns>
                <HeaderStyle BackColor="#6B696B" Font-Bold="True" ForeColor="White" />
                <PagerStyle BackColor="#F7F7DE" ForeColor="Black" HorizontalAlign="Right" />
                <RowStyle BackColor="#F7F7DE" />
                <SelectedRowStyle BackColor="#CE5D5A" Font-Bold="True" ForeColor="White" />
                <SortedAscendingCellStyle BackColor="#FBFBF2" />
                <SortedAscendingHeaderStyle BackColor="#848384" />
                <SortedDescendingCellStyle BackColor="#EAEAD3" />
                <SortedDescendingHeaderStyle BackColor="#575357" />
            </asp:GridView>
        </asp:View>
    </asp:MultiView>
</asp:Content>
